﻿//===================================================================================
// Copyright (c) Ryan Garrett.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================

using System;

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForEnvironmentHelperTestingB : ModelForEnvironmentHelperTestingA
    {
        #region FirstName Property

        [ModelBackingProperty(typeof(String), "FirstNameProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<String> _FirstNameProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the FirstName backing property
        /// </summary>
        public ModelProperty<String> FirstNameProperty
        {
            get { return _FirstNameProperty; }
        }

        /// <summary>
        /// Gets or sets the FirstNameProperty.Value value. This property supports change notification. If the FirstNameProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstNameProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public String FirstName
        {
            get { return FirstNameProperty.Value; }
            set { FirstNameProperty.Value = value; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.CommittedValue value. This property supports change notification. If the FirstNameProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public String FirstNameCommittedValue
        {
            get { return FirstNameProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.IsDirty flag. This property supports change notification. If the FirstNameProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool FirstNameIsDirty
        {
            get { return FirstNameProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.IsInvalid flag. This property supports change notification. If the FirstNameProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool FirstNameIsInvalid
        {
            get { return FirstNameProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.IsDefault flag. This property supports change notification. If the FirstNameProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool FirstNameIsDefault
        {
            get { return FirstNameProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.ValidationErrors enumeration. This property supports change notification. If the FirstNameProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> FirstNameValidationErrors
        {
            get { return FirstNameProperty.ValidationErrors; }
        }

        #endregion

        #region LastName Property

        [ModelBackingProperty(typeof(String), "LastNameProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<String> _LastNameProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the LastName backing property
        /// </summary>
        public ModelProperty<String> LastNameProperty
        {
            get { return _LastNameProperty; }
        }

        /// <summary>
        /// Gets or sets the LastNameProperty.Value value. This property supports change notification. If the LastNameProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [LastNameProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public String LastName
        {
            get { return LastNameProperty.Value; }
            set { LastNameProperty.Value = value; }
        }

        /// <summary>
        /// Gets the LastNameProperty.CommittedValue value. This property supports change notification. If the LastNameProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public String LastNameCommittedValue
        {
            get { return LastNameProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the LastNameProperty.IsDirty flag. This property supports change notification. If the LastNameProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool LastNameIsDirty
        {
            get { return LastNameProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the LastNameProperty.IsInvalid flag. This property supports change notification. If the LastNameProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool LastNameIsInvalid
        {
            get { return LastNameProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the LastNameProperty.IsDefault flag. This property supports change notification. If the LastNameProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool LastNameIsDefault
        {
            get { return LastNameProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the LastNameProperty.ValidationErrors enumeration. This property supports change notification. If the LastNameProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> LastNameValidationErrors
        {
            get { return LastNameProperty.ValidationErrors; }
        }

        #endregion

        #region Sibling Property

        [ModelBackingProperty(typeof(ModelForEnvironmentHelperTestingB), "SiblingProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<ModelForEnvironmentHelperTestingB> _SiblingProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the Sibling backing property
        /// </summary>
        public ModelProperty<ModelForEnvironmentHelperTestingB> SiblingProperty
        {
            get { return _SiblingProperty; }
        }

        /// <summary>
        /// Gets or sets the SiblingProperty.Value value. This property supports change notification. If the SiblingProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [SiblingProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public ModelForEnvironmentHelperTestingB Sibling
        {
            get { return SiblingProperty.Value; }
            set { SiblingProperty.Value = value; }
        }

        /// <summary>
        /// Gets the SiblingProperty.CommittedValue value. This property supports change notification. If the SiblingProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [Sibling + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public ModelForEnvironmentHelperTestingB SiblingCommittedValue
        {
            get { return SiblingProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the SiblingProperty.IsDirty flag. This property supports change notification. If the SiblingProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Sibling + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool SiblingIsDirty
        {
            get { return SiblingProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the SiblingProperty.IsInvalid flag. This property supports change notification. If the SiblingProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Sibling + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool SiblingIsInvalid
        {
            get { return SiblingProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the SiblingProperty.IsDefault flag. This property supports change notification. If the SiblingProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Sibling + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool SiblingIsDefault
        {
            get { return SiblingProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the SiblingProperty.ValidationErrors enumeration. This property supports change notification. If the SiblingProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [Sibling + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> SiblingValidationErrors
        {
            get { return SiblingProperty.ValidationErrors; }
        }

        #endregion

        #region Siblings Property

        [ModelBackingProperty(typeof(ModelForEnvironmentHelperTestingA), "Siblings", ModelBase.StandardBehaviors, true, true)]
        protected readonly ModelCollection<ModelForEnvironmentHelperTestingA> _Siblings = null; //Will be set by reflection.

        /// <summary>
        /// Gets the Siblings property
        /// </summary>
        public ModelCollection<ModelForEnvironmentHelperTestingA> Siblings
        {
            get { return _Siblings; }
        }

        /// <summary>
        /// Gets the Siblings.IsDirty flag. This property supports change notification. If the Siblings.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Siblings + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool SiblingsIsDirty
        {
            get { return Siblings.IsDirty; }
        }

        /// <summary>
        /// Gets the Siblings.IsInvalid flag. This property supports change notification. If the Siblings.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [Siblings + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool SiblingsIsInvalid
        {
            get { return Siblings.IsInvalid; }
        }

        /// <summary>
        /// Gets the Siblings.ValidationErrors enumeration. This property supports change notification. If the Siblings.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [Siblings + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> SiblingsValidationErrors
        {
            get { return Siblings.ValidationErrors; }
        }

        #endregion

        #region ObjectProperty Property

        [ModelBackingProperty(typeof(Object), "ObjectPropertyProperty", ModelBase.StandardBehaviors, false, true)]
        protected readonly ModelProperty<Object> _ObjectPropertyProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the ObjectProperty backing property
        /// </summary>
        public ModelProperty<Object> ObjectPropertyProperty
        {
            get { return _ObjectPropertyProperty; }
        }

        /// <summary>
        /// Gets or sets the ObjectPropertyProperty.Value value. This property supports change notification. If the ObjectPropertyProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectPropertyProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        public Object ObjectProperty
        {
            get { return ObjectPropertyProperty.Value; }
            set { ObjectPropertyProperty.Value = value; }
        }

        /// <summary>
        /// Gets the ObjectPropertyProperty.CommittedValue value. This property supports change notification. If the ObjectPropertyProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectProperty + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        public Object ObjectPropertyCommittedValue
        {
            get { return ObjectPropertyProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the ObjectPropertyProperty.IsDirty flag. This property supports change notification. If the ObjectPropertyProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectProperty + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        public bool ObjectPropertyIsDirty
        {
            get { return ObjectPropertyProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the ObjectPropertyProperty.IsInvalid flag. This property supports change notification. If the ObjectPropertyProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectProperty + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        public bool ObjectPropertyIsInvalid
        {
            get { return ObjectPropertyProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the ObjectPropertyProperty.IsDefault flag. This property supports change notification. If the ObjectPropertyProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectProperty + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        public bool ObjectPropertyIsDefault
        {
            get { return ObjectPropertyProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the ObjectPropertyProperty.ValidationErrors enumeration. This property supports change notification. If the ObjectPropertyProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [ObjectProperty + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        public System.Collections.Generic.IEnumerable<ValidationError> ObjectPropertyValidationErrors
        {
            get { return ObjectPropertyProperty.ValidationErrors; }
        }

        #endregion
    }
}
